home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh -e
- #
- # $Id: dhcp3-client.postinst,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
- #
-
- # Source debconf library.
- . /usr/share/debconf/confmodule
-
- case "$1" in
- configure)
- if [ ! -e /var/lib/dhcp3/dhclient.leases ]; then
- if test -e /var/lib/dhcp/dhclient.leases; then
- cp /var/lib/dhcp/dhclient.leases /var/lib/dhcp3/dhclient.leases
- else
- touch /var/lib/dhcp3/dhclient.leases
- fi
- fi
-
- # create system dhcp user and group
- adduser --system --quiet --no-create-home --home /nonexistent --group dhcp
-
- # allow dhcp client to call setuid wrapper
- chown root:dhcp /lib/dhcp3-client/call-dhclient-script
- chmod 4754 /lib/dhcp3-client/call-dhclient-script
-
- if dpkg --compare-versions "$2" lt-nl "3.0.4-2"; then
- if [ -e /etc/dhcp3/dhclient-script ]; then
- db_input high dhcp3-client/dhclient-script_moved || true
- db_go
- else
- db_input high dhcp3-client/dhclient-needs-restarting
- db_go
- fi
- fi
-
- if [ -e /etc/dhcp3/dhclient.conf.oldconfig ]; then
- mv /etc/dhcp3/dhclient.conf.oldconfig /etc/dhcp3/dhclient.conf
- fi
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- exit 0
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 0
- ;;
- esac
-
-
-